<?php
/*
** author:jackal01@vip.qq.com
*/
header("Content-type: text/html; charset=utf-8");
date_default_timezone_set("PRC");
include 'Crypt3Des.class.php';
$rep=new Crypt3Des('AZJ232D4G9849H6GEMJ0K5I2');//初始化一个对象，并修改默认密钥
$input = "<MERCHANTID>JACKAL</MERCHANTID><APPID>PC</APPID><TTRANS>6</TTRANS><MERCHANTNAME>Jackal</MERCHANTNAME><ACNAME>zhangsan</ACNAME><IDTYPE>1010</IDTYPE><IDNO>360000198809270000</IDNO><MOBILE>18814811121</MOBILE><EMAIL></EMAIL><RETURNURL>http://www.xxxxx.com/back.php</RETURNURL><CUSTMNGRNO></CUSTMNGRNO>";
echo "原文：".htmlentities($input,ENT_QUOTES,"UTF-8")."<br/><br/>";
$encrypt_card=$rep->encrypt($input);
echo "加密：".$encrypt_card."<br/><br/>";
?>